package com.hehe.controller;


import com.hehe.Dao.Test_Mapper;
import com.hehe.POJO.Tb_slang;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@Controller
@RequestMapping(value="/select")
public class Select {

    @Autowired
    private Test_Mapper test_mapper;

    @GetMapping(value="/show_db" )
    public String show_databases(Model model){
        System.out.println("访问 database 啦 ~ !!!");
        List<Tb_slang> all_user = test_mapper.get_All();
        model.addAttribute("all_user" , all_user);
        return "show_db.html";
    }


}




